<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/style.css">
</head>
<body>

<div class="background">
    <div class="name">
        <div class="people"></div>
        <input class="user-name">
    </div>
    <div class="pass">
        <div class="close"></div>
        <input class="password">
    </div>


    <div class="enroll">登录</div>

</div>















<script>
/*
document.documentElement.style.fontSize = innerWidth / 7.5 + 'px';
window.onresize = function () {
document.documentElement.style.fontSize = innerWidth / 7.5 + 'px';
}
*/


const  username=document.querySelector('.user-name');
const   passwords=document.querySelector('.password');
const enroll=document.querySelector('.enroll');

    enroll.onclick=function () {
    if (username.value && passwords.value){
        document.cookie=`username=${username.value};path/=;max-age=${60 * 60 * 24 * 10}`;
        document.cookie=`passwords=${passwords.value};path/=;max-age=${60 * 60 * 24 * 10}`;
        location.href='../mine/index.html';



    }
}





</script>


</body>
</html>